package mm.apk.baselibpreview

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import kotlinx.android.synthetic.main.activity_main.*
import mm.apk.libmm.exts.focus
import mm.apk.libmm.exts.onClick
import mm.apk.libmm.exts.unFocus

class MainActivity : AppCompatActivity() {

    private var isOpen = false

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)


        tv_hello.text = "Retrofit2+Rxjava2+Rxandroid+okhttp3+Lifecycle 的MVP网络框架，精简Google官方AAC框架，实现APP生命周期的管理\nhttps://www.jianshu.com/p/ac0eeadb6151"


        tv_hello.onClick {
            if (isOpen) {
                et_test.unFocus(this)
            } else {
                et_test.focus(this,0)
            }
            isOpen = !isOpen
        }
    }
}
